//
//  HotCell.m
//  YKZB
//
//  Created by 曾少伟 on 2017/3/18.
//  Copyright © 2017年 曾少伟. All rights reserved.
//

#import "HotCell.h"
#import "UIImageView+SDWebImage.h"

@interface HotCell ()

@property (weak, nonatomic) IBOutlet UIImageView *portraitImgView;
@property (weak, nonatomic) IBOutlet UILabel *nickNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *cityLabel;
@property (weak, nonatomic) IBOutlet UILabel *onlineNumLabel;
@property (weak, nonatomic) IBOutlet UIImageView *liveImgView;

@end

@implementation HotCell

- (void)setCell:(LiveModel *)model {
    [self.portraitImgView downloadImage:model.creator.portrait placeholder:@"default_room"];
    self.nickNameLabel.text = model.creator.nick;
    self.cityLabel.text = model.creator.hometown;
    self.onlineNumLabel.text = @(model.onlineUsers).description;
    [self.liveImgView downloadImage:model.creator.portrait placeholder:@"default_room"];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    self.portraitImgView.layer.cornerRadius = 25;
    self.portraitImgView.layer.masksToBounds = YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    debugMethod();
    // Configure the view for the selected state
}

@end
